Skip to content

OCPBUGS-87343: Updating golang-github-openshift-oauth-proxy-container image to be consistent with ART for 5.0#367

Open
openshift-bot wants to merge 1 commit into
openshift:masterfrom
openshift-bot:art-consistency-openshift-5.0-golang-github-openshift-oauth-proxy
Open

OCPBUGS-87343: Updating golang-github-openshift-oauth-proxy-container image to be consistent with ART for 5.0#367
openshift-bot wants to merge 1 commit into
openshift:masterfrom
openshift-bot:art-consistency-openshift-5.0-golang-github-openshift-oauth-proxy

Conversation

@openshift-bot

@openshift-bot openshift-bot commented Jun 6, 2026

Copy link
Copy Markdown

Updating golang-github-openshift-oauth-proxy-container image to be consistent with ART for 5.0
TLDR:
Product builds by ART can be configured for different base and builder images than corresponding CI
builds. This automated PR requests a change to CI configuration to align with ART's configuration;
please take steps to merge it quickly or contact ART to coordinate changes.

The configuration in the following ART component metadata is driving this alignment request:
golang-github-openshift-oauth-proxy.yml.

Detail:

This repository is out of sync with the downstream product builds for this component. The CI
configuration for at least one image differs from ART's expected product configuration. This should
be addressed to ensure that the component's CI testing accurate reflects what customers will
experience.

Most of these PRs are opened as an ART-driven proposal to migrate base image or builder(s) to a
different version, usually prior to GA. The intent is to effect changes in both configurations
simultaneously without breaking either CI or ART builds, so usually ART builds are configured to
consider CI as canonical and attempt to match CI config until the PR merges to align both. ART may
also configure changes in GA releases with CI remaining canonical for a brief grace period to enable
CI to succeed and the alignment PR to merge. In either case, ART configuration will be made
canonical at some point (typically at branch-cut before GA or release dev-cut after GA), so it is
important to align CI configuration as soon as possible.

PRs are also triggered when CI configuration changes without ART coordination, for instance to
change the number of builder images or to use a different golang version. These changes should be
coordinated with ART; whether ART configuration is canonical or not, preferably it would be updated
first to enable the changes to occur simultaneously in both CI and ART at the same time. This also
gives ART a chance to validate the intended changes first. For instance, ART compiles most
components with the Golang version being used by the control plane for a given OpenShift release.
Exceptions to this convention (i.e. you believe your component must be compiled with a Golang
version independent from the control plane) must be granted by the OpenShift staff engineers and
communicated to the ART team.

Roles & Responsibilities:

  • Component owners are responsible for ensuring these alignment PRs merge with passing
    tests OR that necessary metadata changes are reported to the ART team
    in #forum-ocp-art on Slack. If necessary, the changes required by this pull request can be
    introduced with a separate PR opened by the component team. Once the repository is aligned,
    this PR will be closed automatically.
  • In particular, it could be that a job like verify-deps is complaining. In that case, please open
    a new PR with the dependency issues addressed (and base images bumped). ART-9595 for reference.
  • Patch-manager or those with sufficient privileges within this repository may add
    any required labels to ensure the PR merges once tests are passing. In cases where ART config is
    canonical, downstream builds are already being built with these changes, and merging this PR
    only improves the fidelity of our CI. In cases where ART config is not canonical, this provides
    a grace period for the component team to align their CI with ART's configuration before it becomes
    canonical in product builds.

ART has been configured to reconcile your CI build root image (see https://docs.ci.openshift.org/docs/architecture/ci-operator/#build-root-image).
In order for your upstream .ci-operator.yaml configuration to be honored, you must set the following in your openshift/release ci-operator configuration file:

build_root:
  from_repository: true

Change behavior of future PRs:

  • In case you just want to follow the base images that ART suggests, you can configure additional labels to be
    set up automatically. This means that such a PR would merge without human intervention (and awareness!) in the future.
    To do so, open a PR to set the auto_label attribute in the image configuration. Example
  • You can set a commit prefix, like UPSTREAM: <carry>: . An example.

If you have any questions about this pull request, please reach out in the #forum-ocp-art Slack channel.

@openshift-bot openshift-bot force-pushed the art-consistency-openshift-5.0-golang-github-openshift-oauth-proxy branch from 0608c53 to e65906a Compare June 6, 2026 11:29
@openshift-bot

Copy link
Copy Markdown
Author

@coderabbitai

coderabbitai Bot commented Jun 6, 2026

Copy link
Copy Markdown

Walkthrough

The PR upgrades build environment dependencies from Go 1.25 and OpenShift 4.22 to Go 1.26 and OpenShift 5.0. The CI operator configuration and Dockerfile base images are updated consistently to use the new builder and runtime images.

Changes

Build environment version upgrade

Layer / File(s) Summary
Go and OpenShift version upgrade
.ci-operator.yaml, Dockerfile
CI build root image tag updated to rhel-9-release-golang-1.26-openshift-5.0, and Dockerfile multi-stage builder and runtime base images changed from OpenShift 4.22 to OpenShift 5.0 RHEL9 base.

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed PR modifies only CI config and Dockerfile. No Ginkgo test code added or modified. Repository uses Go testing package, not Ginkgo. Check not applicable.
Test Structure And Quality ✅ Passed This PR only modifies .ci-operator.yaml and Dockerfile (CI/container configuration). No Ginkgo test code changes are present, making the test quality check not applicable.
Microshift Test Compatibility ✅ Passed PR updates CI/Dockerfile config only. No Ginkgo e2e tests added; test file uses standard Go testing. Check only applies to new Ginkgo tests.
Single Node Openshift (Sno) Test Compatibility ✅ Passed No Ginkgo e2e tests added. PR only updates CI config and introduces test/e2e/proxy_test.go using standard Go testing.T framework, not Ginkgo.
Topology-Aware Scheduling Compatibility ✅ Passed Changes are CI build configuration and Dockerfile base images only; no deployment manifests, operator code, or scheduling constraints introduced.
Ote Binary Stdout Contract ✅ Passed PR only modifies container configuration (.ci-operator.yaml, Dockerfile) without changing binary source code, making OTE stdout contract check inapplicable.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed PR contains only CI configuration changes (.ci-operator.yaml, Dockerfile, .gitignore) with no new Ginkgo e2e tests added, making the IPv6/disconnected network compatibility check not applicable.
No-Weak-Crypto ✅ Passed The PR only updates container image tags in .ci-operator.yaml and Dockerfile (Go 1.25→1.26, OpenShift 4.22→5.0). It does not modify any cryptographic code or introduce weak crypto patterns.
Container-Privileges ✅ Passed No privileged container settings found: no privileged:true, hostPID/Network/IPC, SYS_ADMIN, or allowPrivilegeEscalation:true in manifests or Dockerfile modifications.
No-Sensitive-Data-In-Logs ✅ Passed PR contains only configuration changes (Go/OpenShift version upgrades in .ci-operator.yaml and Dockerfile) with no code modifications, logging additions, or sensitive data exposure risks.
Title check ✅ Passed The PR title clearly and specifically describes the main change: updating container images for golang-github-openshift-oauth-proxy to align with ART's OpenShift 5.0 configuration.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-bot openshift-bot changed the title Updating golang-github-openshift-oauth-proxy-container image to be consistent with ART for 5.0 OCPBUGS-87343: Updating golang-github-openshift-oauth-proxy-container image to be consistent with ART for 5.0 Jun 6, 2026
@openshift-ci openshift-ci Bot requested review from ibihim and liouk June 6, 2026 11:29
@openshift-ci

openshift-ci Bot commented Jun 6, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: openshift-bot
Once this PR has been reviewed and has the lgtm label, please assign ibihim for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jun 6, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@openshift-bot: This pull request references Jira Issue OCPBUGS-87343, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

Updating golang-github-openshift-oauth-proxy-container image to be consistent with ART for 5.0
TLDR:
Product builds by ART can be configured for different base and builder images than corresponding CI
builds. This automated PR requests a change to CI configuration to align with ART's configuration;
please take steps to merge it quickly or contact ART to coordinate changes.

The configuration in the following ART component metadata is driving this alignment request:
golang-github-openshift-oauth-proxy.yml.

Detail:

This repository is out of sync with the downstream product builds for this component. The CI
configuration for at least one image differs from ART's expected product configuration. This should
be addressed to ensure that the component's CI testing accurate reflects what customers will
experience.

Most of these PRs are opened as an ART-driven proposal to migrate base image or builder(s) to a
different version, usually prior to GA. The intent is to effect changes in both configurations
simultaneously without breaking either CI or ART builds, so usually ART builds are configured to
consider CI as canonical and attempt to match CI config until the PR merges to align both. ART may
also configure changes in GA releases with CI remaining canonical for a brief grace period to enable
CI to succeed and the alignment PR to merge. In either case, ART configuration will be made
canonical at some point (typically at branch-cut before GA or release dev-cut after GA), so it is
important to align CI configuration as soon as possible.

PRs are also triggered when CI configuration changes without ART coordination, for instance to
change the number of builder images or to use a different golang version. These changes should be
coordinated with ART; whether ART configuration is canonical or not, preferably it would be updated
first to enable the changes to occur simultaneously in both CI and ART at the same time. This also
gives ART a chance to validate the intended changes first. For instance, ART compiles most
components with the Golang version being used by the control plane for a given OpenShift release.
Exceptions to this convention (i.e. you believe your component must be compiled with a Golang
version independent from the control plane) must be granted by the OpenShift staff engineers and
communicated to the ART team.

Roles & Responsibilities:

  • Component owners are responsible for ensuring these alignment PRs merge with passing
    tests OR that necessary metadata changes are reported to the ART team
    in #forum-ocp-art on Slack. If necessary, the changes required by this pull request can be
    introduced with a separate PR opened by the component team. Once the repository is aligned,
    this PR will be closed automatically.
  • In particular, it could be that a job like verify-deps is complaining. In that case, please open
    a new PR with the dependency issues addressed (and base images bumped). ART-9595 for reference.
  • Patch-manager or those with sufficient privileges within this repository may add
    any required labels to ensure the PR merges once tests are passing. In cases where ART config is
    canonical, downstream builds are already being built with these changes, and merging this PR
    only improves the fidelity of our CI. In cases where ART config is not canonical, this provides
    a grace period for the component team to align their CI with ART's configuration before it becomes
    canonical in product builds.

ART has been configured to reconcile your CI build root image (see https://docs.ci.openshift.org/docs/architecture/ci-operator/#build-root-image).
In order for your upstream .ci-operator.yaml configuration to be honored, you must set the following in your openshift/release ci-operator configuration file:

build_root:
 from_repository: true

Change behavior of future PRs:

  • In case you just want to follow the base images that ART suggests, you can configure additional labels to be
    set up automatically. This means that such a PR would merge without human intervention (and awareness!) in the future.
    To do so, open a PR to set the auto_label attribute in the image configuration. Example
  • You can set a commit prefix, like UPSTREAM: <carry>: . An example.

If you have any questions about this pull request, please reach out in the #forum-ocp-art Slack channel.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot openshift-ci-robot added the jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. label Jun 6, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@openshift-bot: This pull request references Jira Issue OCPBUGS-87343, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)
Details

In response to this:

Updating golang-github-openshift-oauth-proxy-container image to be consistent with ART for 5.0
TLDR:
Product builds by ART can be configured for different base and builder images than corresponding CI
builds. This automated PR requests a change to CI configuration to align with ART's configuration;
please take steps to merge it quickly or contact ART to coordinate changes.

The configuration in the following ART component metadata is driving this alignment request:
golang-github-openshift-oauth-proxy.yml.

Detail:

This repository is out of sync with the downstream product builds for this component. The CI
configuration for at least one image differs from ART's expected product configuration. This should
be addressed to ensure that the component's CI testing accurate reflects what customers will
experience.

Most of these PRs are opened as an ART-driven proposal to migrate base image or builder(s) to a
different version, usually prior to GA. The intent is to effect changes in both configurations
simultaneously without breaking either CI or ART builds, so usually ART builds are configured to
consider CI as canonical and attempt to match CI config until the PR merges to align both. ART may
also configure changes in GA releases with CI remaining canonical for a brief grace period to enable
CI to succeed and the alignment PR to merge. In either case, ART configuration will be made
canonical at some point (typically at branch-cut before GA or release dev-cut after GA), so it is
important to align CI configuration as soon as possible.

PRs are also triggered when CI configuration changes without ART coordination, for instance to
change the number of builder images or to use a different golang version. These changes should be
coordinated with ART; whether ART configuration is canonical or not, preferably it would be updated
first to enable the changes to occur simultaneously in both CI and ART at the same time. This also
gives ART a chance to validate the intended changes first. For instance, ART compiles most
components with the Golang version being used by the control plane for a given OpenShift release.
Exceptions to this convention (i.e. you believe your component must be compiled with a Golang
version independent from the control plane) must be granted by the OpenShift staff engineers and
communicated to the ART team.

Roles & Responsibilities:

  • Component owners are responsible for ensuring these alignment PRs merge with passing
    tests OR that necessary metadata changes are reported to the ART team
    in #forum-ocp-art on Slack. If necessary, the changes required by this pull request can be
    introduced with a separate PR opened by the component team. Once the repository is aligned,
    this PR will be closed automatically.
  • In particular, it could be that a job like verify-deps is complaining. In that case, please open
    a new PR with the dependency issues addressed (and base images bumped). ART-9595 for reference.
  • Patch-manager or those with sufficient privileges within this repository may add
    any required labels to ensure the PR merges once tests are passing. In cases where ART config is
    canonical, downstream builds are already being built with these changes, and merging this PR
    only improves the fidelity of our CI. In cases where ART config is not canonical, this provides
    a grace period for the component team to align their CI with ART's configuration before it becomes
    canonical in product builds.

ART has been configured to reconcile your CI build root image (see https://docs.ci.openshift.org/docs/architecture/ci-operator/#build-root-image).
In order for your upstream .ci-operator.yaml configuration to be honored, you must set the following in your openshift/release ci-operator configuration file:

build_root:
 from_repository: true

Change behavior of future PRs:

  • In case you just want to follow the base images that ART suggests, you can configure additional labels to be
    set up automatically. This means that such a PR would merge without human intervention (and awareness!) in the future.
    To do so, open a PR to set the auto_label attribute in the image configuration. Example
  • You can set a commit prefix, like UPSTREAM: <carry>: . An example.

If you have any questions about this pull request, please reach out in the #forum-ocp-art Slack channel.

Summary by CodeRabbit

  • Chores
  • Updated build infrastructure to use Go 1.26 and OpenShift 5.0 runtime base images.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
Dockerfile (2)

1-9: 🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick win

Add HEALTHCHECK directive.

The Dockerfile is missing a HEALTHCHECK directive, which is required by the container security guidelines to enable proper health monitoring.

💊 Suggested addition

Add a HEALTHCHECK before the ENTRYPOINT (adjust the endpoint/port based on oauth-proxy's actual health endpoint):

 FROM registry.ci.openshift.org/ocp/5.0:base-rhel9
 COPY --from=builder /go/src/github.com/openshift/oauth-proxy/oauth-proxy /usr/bin/oauth-proxy
+HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
+  CMD ["/usr/bin/oauth-proxy", "--version"] || exit 1
 ENTRYPOINT ["/usr/bin/oauth-proxy"]

Note: Adjust the healthcheck command to use an actual health endpoint if oauth-proxy provides one (e.g., HTTP /health or /ping).

As per coding guidelines: "HEALTHCHECK defined" from container security guidelines for **/{Dockerfile,Containerfile}*.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Dockerfile` around lines 1 - 9, The Dockerfile lacks a HEALTHCHECK directive
required by the container security guidelines; add a HEALTHCHECK instruction
placed before the ENTRYPOINT that exercises the oauth-proxy binary (referenced
as /usr/bin/oauth-proxy and ENTRYPOINT ["/usr/bin/oauth-proxy"]) using an HTTP
or TCP probe (e.g., curl/wget to /health or /ping on the appropriate port) and
include sensible options (interval, timeout, start-period, retries); adjust the
exact endpoint/port to the oauth-proxy health endpoint and ensure the command
returns non-zero on failure so the container runtime can mark unhealthy.

Source: Coding guidelines


1-9: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Add USER directive to run as non-root.

The container lacks a USER directive and will run as root, violating the security guideline "USER non-root; never run as root." This is a critical security issue also flagged by Trivy (DS-0002).

🔒 Recommended fix

Add a non-root user before the ENTRYPOINT in the final stage:

 FROM registry.ci.openshift.org/ocp/5.0:base-rhel9
 COPY --from=builder /go/src/github.com/openshift/oauth-proxy/oauth-proxy /usr/bin/oauth-proxy
+RUN useradd -r -u 1001 -g 0 oauth-proxy && \
+    chown -R 1001:0 /usr/bin/oauth-proxy
+USER 1001
 ENTRYPOINT ["/usr/bin/oauth-proxy"]

As per coding guidelines: "USER non-root; never run as root" from container security guidelines for **/{Dockerfile,Containerfile}*.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Dockerfile` around lines 1 - 9, The final image currently runs as root
(ENTRYPOINT ["/usr/bin/oauth-proxy"]); create a non-root user (e.g., oauthproxy)
in the final stage, chown or ensure /usr/bin/oauth-proxy is owned/executable by
that user, and add a USER oauthproxy directive before ENTRYPOINT so the
container does not run as root; reference the final stage binary path
(/usr/bin/oauth-proxy) and the ENTRYPOINT to locate where to apply the changes.

Sources: Coding guidelines, Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@Dockerfile`:
- Line 3: The Dockerfile currently uses a broad COPY . . which pulls the entire
build context; replace that with explicit COPY instructions for only the
required files and directories (for example COPY go.mod go.sum ./ and COPY
<source-dir>/ ./<dest-dir>/ or COPY cmd/ pkg/ internal/ as appropriate) so you
avoid including secrets or unnecessary files in the image; update the
Dockerfile’s COPY statements to list the specific files/directories instead of
using COPY . ..
- Line 1: The Dockerfile currently pulls images from registry.ci.openshift.org
(the FROM line with the builder stage and the runtime base-rhel9 image), which
violates container security guidelines; update the FROM lines so the build-stage
uses an approved Red Hat builder image from catalog.redhat.com (replace the
current ocp/builder:rhel-9-golang-1.26-openshift-5.0 reference) and ensure the
runtime stage no longer uses base-rhel9/openshift-enterprise-base-rhel9 but
instead uses a UBI minimal or distroless runtime image from catalog.redhat.com
(for example a UBI minimal/distroless tag), keeping the existing builder stage
name (builder) and runtime stage names intact while switching the image
registry/type to catalog.redhat.com and a UBI-minimal or distroless image.

---

Outside diff comments:
In `@Dockerfile`:
- Around line 1-9: The Dockerfile lacks a HEALTHCHECK directive required by the
container security guidelines; add a HEALTHCHECK instruction placed before the
ENTRYPOINT that exercises the oauth-proxy binary (referenced as
/usr/bin/oauth-proxy and ENTRYPOINT ["/usr/bin/oauth-proxy"]) using an HTTP or
TCP probe (e.g., curl/wget to /health or /ping on the appropriate port) and
include sensible options (interval, timeout, start-period, retries); adjust the
exact endpoint/port to the oauth-proxy health endpoint and ensure the command
returns non-zero on failure so the container runtime can mark unhealthy.
- Around line 1-9: The final image currently runs as root (ENTRYPOINT
["/usr/bin/oauth-proxy"]); create a non-root user (e.g., oauthproxy) in the
final stage, chown or ensure /usr/bin/oauth-proxy is owned/executable by that
user, and add a USER oauthproxy directive before ENTRYPOINT so the container
does not run as root; reference the final stage binary path
(/usr/bin/oauth-proxy) and the ENTRYPOINT to locate where to apply the changes.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 5c9075ea-1736-47b2-a70f-a00d87136359

📥 Commits

Reviewing files that changed from the base of the PR and between fa27a04 and e65906a.

📒 Files selected for processing (2)
  • .ci-operator.yaml
  • Dockerfile

Comment thread Dockerfile
@@ -1,8 +1,8 @@
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.25-openshift-4.22 AS builder
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.26-openshift-5.0 AS builder

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify the base image type and registry alignment with guidelines

echo "=== Checking if base-rhel9 is UBI minimal or distroless ==="
# Inspect the runtime base image metadata
skopeo inspect docker://registry.ci.openshift.org/ocp/5.0:base-rhel9 2>/dev/null | jq -r '.Labels | to_entries[] | select(.key | contains("name") or contains("summary") or contains("description")) | "\(.key): \(.value)"'

echo ""
echo "=== Checking builder image metadata ==="
skopeo inspect docker://registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.26-openshift-5.0 2>/dev/null | jq -r '.Labels | to_entries[] | select(.key | contains("name") or contains("summary") or contains("description")) | "\(.key): \(.value)"'

echo ""
echo "=== Note: Coding guidelines specify catalog.redhat.com as source ==="
echo "Current images use: registry.ci.openshift.org"

Repository: openshift/oauth-proxy

Length of output: 282


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Tool availability ==="
command -v skopeo || echo "skopeo not found"
command -v jq || echo "jq not found"

echo
echo "=== Inspect runtime image (base-rhel9) ==="
set +e
skopeo inspect docker://registry.ci.openshift.org/ocp/5.0:base-rhel9
rc=$?
set -e
echo "exit_code=$rc"

echo
echo "=== Inspect builder image ==="
set +e
skopeo inspect docker://registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.26-openshift-5.0
rc=$?
set -e
echo "exit_code=$rc"

echo
echo "=== Fallback: try to fetch manifest (network check) ==="
# Try to detect whether sandbox has outbound network; do not parse heavily.
set +e
curl -I --max-time 10 https://catalog.redhat.com/ 1>/dev/null 2>/dev/null
echo "curl_catalog_redhat_rc=$?"
curl -I --max-time 10 https://registry.ci.openshift.org/ 1>/dev/null 2>/dev/null
echo "curl_registry_ci_openshift_rc=$?"
set -e

Repository: openshift/oauth-proxy

Length of output: 447


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Locate Dockerfile(s) ==="
fd -a -t f 'Dockerfile' . || true
fd -a -t f 'Containerfile' . || true

echo
echo "=== Show Dockerfile(s) content (first ~200 lines each) ==="
for f in $(fd -a -t f 'Dockerfile' .); do
  echo "----- $f -----"
  sed -n '1,200p' "$f"
done

Repository: openshift/oauth-proxy

Length of output: 1375


🌐 Web query:

What is the purpose/content of the OpenShift CI image tag registry.ci.openshift.org/ocp/5.0:base-rhel9 (is it UBI minimal, minimal, distroless, or something else)?

💡 Result:

The image tag registry.ci.openshift.org/ocp/5.0:base-rhel9 (often referred to as base-rhel9) serves as a foundational Red Hat Enterprise Linux 9-based image used for building and running various OpenShift components within the OpenShift CI environment [1][2]. It is not a "distroless" image, nor is it strictly defined as "minimal" or "UBI minimal" by that specific naming convention. Instead, it is an OpenShift-specific base image—commonly known as openshift-enterprise-base-rhel9—maintained by the OpenShift Automated Release Team (ART) [3]. It is designed to be the consistent, enterprise-grade RHEL 9 base layer that downstream OpenShift component images use as their parent (via FROM instructions in Dockerfiles) to ensure consistency across the product [1][3][2]. Key points regarding its purpose and content: - Base Layer: It provides the required RHEL 9 user-space environment, shared libraries, and core configuration that OpenShift binaries require to run, replacing the older RHEL 8-based base images [1][3]. - Component Building: It is used as the starting point for creating various OpenShift service images (e.g., the installer image) [2]. - Standardized Maintenance: The image is managed to remain consistent with downstream product builds, ensuring that CI testing environment reflects the production environment customers will receive [3]. In the context of the OpenShift CI ecosystem, it is effectively the RHEL 9 iteration of the standard OpenShift base image [1]. While it shares common traits with minimal RHEL/UBI images, its specific identity in the ocp namespace is as the authorized, synchronized base for OpenShift product components [1][3].

Citations:


🌐 Web query:

What is the purpose/content of the OpenShift CI builder image tag registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.26-openshift-5.0?

💡 Result:

The image tag registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.26-openshift-5.0 is a specialized container image used as a build environment within the OpenShift CI (Continuous Integration) infrastructure [1][2]. Its primary purpose is to provide a standardized, controlled toolchain for building OpenShift Container Platform (OCP) components [1]. By referencing this image in the FROM directive of a Dockerfile (or as a build_root_image in ci-operator configuration), developers ensure that their software is compiled using a specific, tested version of the Go programming language (in this case, Go 1.26) on a RHEL 9 base, consistent with the requirements of OpenShift version 5.0 [1][2]. The components of the tag indicate its specific configuration [1]: - rhel-9: Indicates the underlying Red Hat Enterprise Linux 9 operating system used in the image [1]. - golang-1.26: Specifies that the image includes Go version 1.26 [1]. - openshift-5.0: Identifies that this builder image is aligned with the OpenShift 5.0 release stream [1]. These images are managed by the OpenShift Architecture and Release Team (ART) [1]. When the required Go version or base OS for OpenShift changes, ART updates the central build configuration, and automation propagates these changes across the various component repositories by updating their build manifests [1]. Users are generally expected to use these officially provided builder images rather than custom ones to ensure compatibility with the OCP build environment and release processes [1][3].

Citations:


Base image registry/type don’t meet container security guidelines

  • Dockerfile pulls both build and runtime images from registry.ci.openshift.org (ocp/builder... and ocp/5.0:base-rhel9), not from catalog.redhat.com as required by the guidelines.
  • base-rhel9 is an OpenShift enterprise RHEL9 base layer (“openshift-enterprise-base-rhel9”), not a UBI minimal or distroless image, so the runtime stage doesn’t satisfy the “UBI minimal or distroless” requirement.
🧰 Tools
🪛 Trivy (0.69.3)

[error] 1-1: Image user should not be 'root'

Specify at least 1 USER command in Dockerfile with non-root user as argument

Rule: DS-0002

Learn more

(IaC/Dockerfile)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Dockerfile` at line 1, The Dockerfile currently pulls images from
registry.ci.openshift.org (the FROM line with the builder stage and the runtime
base-rhel9 image), which violates container security guidelines; update the FROM
lines so the build-stage uses an approved Red Hat builder image from
catalog.redhat.com (replace the current
ocp/builder:rhel-9-golang-1.26-openshift-5.0 reference) and ensure the runtime
stage no longer uses base-rhel9/openshift-enterprise-base-rhel9 but instead uses
a UBI minimal or distroless runtime image from catalog.redhat.com (for example a
UBI minimal/distroless tag), keeping the existing builder stage name (builder)
and runtime stage names intact while switching the image registry/type to
catalog.redhat.com and a UBI-minimal or distroless image.

Source: Coding guidelines

Comment thread Dockerfile
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.25-openshift-4.22 AS builder
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.26-openshift-5.0 AS builder
WORKDIR /go/src/github.com/openshift/oauth-proxy
COPY . .

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick win

Avoid copying entire context; specify needed files.

The guideline requires "COPY specific files, not entire context." Consider copying only the files needed for the build (e.g., go.mod, go.sum, source directories).

📋 Suggested refinement
-COPY . .
+COPY go.mod go.sum ./
+COPY cmd/ ./cmd/
+COPY pkg/ ./pkg/
+# Add other specific source directories as needed

As per coding guidelines: "COPY specific files, not entire context" from container security guidelines for **/{Dockerfile,Containerfile}*.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Dockerfile` at line 3, The Dockerfile currently uses a broad COPY . . which
pulls the entire build context; replace that with explicit COPY instructions for
only the required files and directories (for example COPY go.mod go.sum ./ and
COPY <source-dir>/ ./<dest-dir>/ or COPY cmd/ pkg/ internal/ as appropriate) so
you avoid including secrets or unnecessary files in the image; update the
Dockerfile’s COPY statements to list the specific files/directories instead of
using COPY . ..

Source: Coding guidelines

@openshift-ci

openshift-ci Bot commented Jun 6, 2026

Copy link
Copy Markdown

@openshift-bot: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@openshift-bot

Copy link
Copy Markdown
Author

ART wants to connect issue OCPBUGS-87630 to this PR, but found it is currently hooked up to ['OCPBUGS-87343']. Please consult with #forum-ocp-art if it is not clear what there is to do.

@openshift-bot openshift-bot added the verified Signifies that the PR passed pre-merge verification criteria label Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants